POV-Ray : Newsgroups : povray.general : height_field { function n, n { ... weirdness : Re: height_field { function n, n { ... weirdness Server Time
3 Aug 2024 20:14:49 EDT (-0400)
  Re: height_field { function n, n { ... weirdness  
From: ABX
Date: 27 Oct 2003 09:51:31
Message: <6jbqpvo3pcufp7nb9rok6eddgu4ohuivtr@4ax.com>
On Mon, 27 Oct 2003 15:18:17 +0100, "Thorsten Froehlich" <tho### [at] trfde>
wrote:
> > Are you sure about this Thorsten ?
>
> The relevant code was taken unchanged from MegaPOV (0.7 iirc), and there it
> worked without problems.

Let's see what happens with height value when function 100,100 happens:

1.  during parsing:
        Image->height = Parse_Float();
    so 100 is in height field

2.  during making image with pattern
        Image->iheight = Image->height;     // iheight = 100, height = 100
	Image->height--;                    // iheight = 100, height = 99
        for(i = 0; i < Image->iheight; i++) // i = 0 .. 99
        { 
            Point[Y] = ((DBL)i / (Image->height - 1));
                                            // Point[Y] = 0/98 .. 99/98

99/98 ?

ABX


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.